package com.party.core.model.member;

import com.party.core.utils.MyBeanUtils;

/**
 * 地址输出
 * Created by yifeng
 *
 * @date 2018/4/18 0018
 * @time 下午 17:08
 */
public class MemberAddressOutput {
    private String id;

    private String name;

    private String phone;

    private String fullAddress;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getFullAddress() {
        return fullAddress;
    }

    public void setFullAddress(String fullAddress) {
        this.fullAddress = fullAddress;
    }

    public static MemberAddressOutput transform(MemberAddress address) throws Exception {
        MemberAddressOutput output = new MemberAddressOutput();
        MyBeanUtils.copyBeanNotNull2Bean(address, output);
        output.setFullAddress(address.getShowAddress() + " " + address.getDetailAddress());
        return output;
    }
}
